﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WoWConnecter.Entities;
using WoWConnecter.Group;

namespace WoWConnecter.Chat
{
    public class ChatMessage
    {
        public Character Sender { get; private set; }
        //public Character Sender { get; private set; }
        public ChatLanguage Language { get; private set; }
        public ChatTag Tag { get; private set; }
        public string Message { get; private set; }

        public Channel Channel
        {
            get
            {
                if (origin is Channel)
                    return (Channel)origin;

                return null;
            }
        }

        public Party Party
        {
            get
            {
                if (origin is Party)
                    return (Party)origin;

                return null;
            }
        }

        private object origin;

        public ChatMessage(Channel channel, Character sender, ChatLanguage language, ChatTag tag, string message)
        {
            origin = channel;
            Sender = sender;
            Language = language;
            Tag = tag;
            Message = message;
        }
    }
}
